Once you have the sample description prepared, you call AddMediaSample to add the effect description to the media. Listing 9 shows an example call.
Listing 9 Calling AddMediaSample to add the effect description
// Always call BeginMediaEdits before adding sample to a media
BeginMediaEdits(theEffectsMedia);
// Add the sample to the media
AddMediaSample(theEffectsMedia,
(Handle)
theEffectDescription,
0,
GetHandleSize((Handle)
theEffectDescription),
600,
(SampleDescriptionHandle)
sampleDescription,
1,
0,
&sampleTime);
// End the media editing session
EndMediaEdits(theEffectsMedia);
| Previous | Chapter Contents | Chapter Top | Next |